class UserEntity {
  int teacherId;
  String teacherName;
  int mobile;
  int schoolId;
  int sex;
  String headimg;
  String content;
  ClassInfo classInfo;

  UserEntity(
      {this.teacherId,
        this.teacherName,
        this.mobile,
        this.schoolId,
        this.sex,
        this.headimg,
        this.content,
        this.classInfo});

  UserEntity.fromJson(Map<String, dynamic> json) {
    teacherId = json['teacher_id'];
    teacherName = json['teacher_name'];
    mobile = json['mobile'];
    schoolId = json['school_id'];
    sex = json['sex'];
    headimg = json['headimg'];
    content = json['content'];
    classInfo = json['class_info'] != null
        ? new ClassInfo.fromJson(json['class_info'])
        : null;
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['teacher_id'] = this.teacherId;
    data['teacher_name'] = this.teacherName;
    data['mobile'] = this.mobile;
    data['school_id'] = this.schoolId;
    data['sex'] = this.sex;
    data['headimg'] = this.headimg;
    data['content'] = this.content;
    if (this.classInfo != null) {
      data['class_info'] = this.classInfo.toJson();
    }
    return data;
  }
}

class ClassInfo {
  String className;
  int isSave;

  ClassInfo({this.className, this.isSave});

  ClassInfo.fromJson(Map<String, dynamic> json) {
    className = json['class_name'];
    isSave = json['is_save'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['class_name'] = this.className;
    data['is_save'] = this.isSave;
    return data;
  }
}